package com.hoshiibuy.purchase.feign;

import com.hoshiibuy.common.rpc.Response;
import com.hoshiibuy.purchase.feign.hystrix.HystrixCompanyFeignFallback;
import com.hoshiibuy.purchase.feign.hystrix.HystrixOrganizationFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author:campchen
 * @Date:Created in 上午 11:11 2019/5/17
 * @PACKAGENAME com.hoshiibuy.organization.feign
 * @Description
 */
@FeignClient(name = "hoshiibuy-organization", fallback = HystrixOrganizationFeignFallback.class)
public interface OrganizationService {

    @GetMapping(value = "/com-organization/{id}")
    Response getByComId(@PathVariable("id") Long id);

    @GetMapping(value = "/plat-organization/{id}")
    Response getByPlatId(@PathVariable("id") Long id);

    @GetMapping(value = "/store-organization/{id}")
    Response getByStoreId(@PathVariable("id") Long id);
}
